<?php
	
	/**
	 * Login controller which extends LoginModule. Could also be used for individual
	 * user based login boxes.
	 * 
	 * @author bsuter
	 */
	Class LoginController Extends Yomm_Module_Login {
		
		Public $compression = true;
		
		Public $theme = Yomm_Config::VAR_BACKEND_THEME;
		
		Public $LoginSuccessUrl = "?controller=admin";
		
		Public $LoginFailUrl = "?controller=login&status=false";
		
		Public $LogoutUrl = null;
		
		Public Function Index()
		{
			// define user agent
			$UA = Tools::BrowserInfo();
			
			if(isset($UA['firefox']) || isset($UA['safari']))
			{
				$valid_browser = true;
				//$valid_browser = false;
			} else {
				$valid_browser = false;
			}
			
			$this->view->assign(array(
				'valid_browser' => $valid_browser,
				'ua_err_msg' => $this->local->ua_err_msg()
			));
			
			return $this->view->show('login/index.tpl');
		}
		
	}